{{template "header.html" .}}
<div class="container clear">
    <div id="comment-list-container" class="clear">
        <div id="comment-list-meta" class="left">
            <h1 class="h1">评论</h1>
            <ul id="comment-status-list" class="list" data-status="{{.Status}}">
                <li><a href="/admin/comments/pending/" rel="pending">审核中<span class="num numA{{.Group.pending}}">{{.Group.pending}}</span></a></li>
                <li><a href="/admin/comments/approved/" rel="approved">通过的</a></li>
                <li><a href="/admin/comments/spam/" rel="spam">垃圾箱<span class="num numA{{.Group.spam}}">{{.Group.spam}}</span></a></li>
            </ul>
        </div>
        <div id="comment-list" class="left">
            <div id="comment-pager" class="pager">{{Raw .Pager}}</div>{{range .Comments}}
            <div class="comment-item clear" id="comment-{{.id}}">
                <span class="comment-id left">{{.id}}</span>
                <img class="comment-avatar left" src="{{.avatar}}" alt="{{.author}}">
                <div class="comment-container">
                    <p class="comment-meta-header">
                        <a class="comment-author" href="{{.url}}">{{.author}}</a>
                        <span class="comment-time">{{DateFormatString .add_time "MM.DD HH:mm"}}</span>
                        <a class="comment-article" href="#">@{{.article_title}}{{if ne .parent_id "0"}} - {{.parent_id}}{{end}}</a>
                        <a class="comment-reply hide" href="#comment-{{.id}}">回复</a>
                        <a class="comment-approve hide" href="#comment-{{.id}}">审核</a>
                        <a class="comment-spam hide" href="#comment-{{.id}}">垃圾</a>
                        <a class="comment-remove hide" href="#comment-{{.id}}">删除</a>
                    </p>
                    <div class="comment-content">{{Raw .content}}</div>
                </div>
            </div>{{end}}
        </div>
        <form id="comment-reply-form" class="form clear hide" action="/admin/comments/reply" method="post">
            <textarea class="ipt left" name="content" id="comment-reply-content"></textarea>
            <button class="btn left" id="comment-reply-submit">Reply Comment</button>
            <input id="comment-reply-parent" type="hidden" value="0" name="parent"/>
        </form>
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        commentInit();
        commentAction();
    });
</script>
</body>
</html>